package cn.falcon.fmobi.console.requestparam;

import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

public class FinanceQuery extends AbstractPagingSortParam {

    /**
     * 代理商ID
     */
    private Integer agentId;
    /**
     * 广告主ID或名称
     */
    private String search;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date startDate;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endDate;

    public Integer getAgentId() {
        return agentId;
    }

    public void setAgentId(Integer agentId) {
        this.agentId = agentId;
    }

    public String getSearch() {
        return search;
    }

    public void setSearch(String search) {
        this.search = search;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public Map<String,Object> getMap(){
        Map<String,Object> map=new HashMap<>();
        map.put("agentId",this.agentId);
        map.put("search",this.search);
        map.put("startDate",this.startDate);
        map.put("endDate",this.endDate);
        return map;
    }
}
